
/* =========================================
   DHR PROFILE DIRECTORY
   Inspired by YMF Mentor Directory
========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: #24364b;
    background: #f4f7fc;
}

a {
    text-decoration: none;
}

/* =========================================
   GOVERNMENT TOP BAR
========================================= */

.topbar {
    background: #06366f;
    color: #fff;
    min-height: 48px;
    font-size: 11px;
}

.top-inner {
    max-width: 1450px;
    width: 92%;
    margin: auto;
    min-height: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.gov {
    display: flex;
    align-items: center;
    gap: 12px;
}

.emblem {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.gov-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gov-copy strong {
    font-size: 12px;
    font-weight: 700;
}

.gov-copy span {
    color: #d5e7ff;
    font-size: 10px;
}

.top-divider {
    height: 28px;
    width: 1px;
    background: rgba(255,255,255,.35);
    margin: 0 5px;
}

.top-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-links a {
    color: #e5f0ff;
    font-size: 10px;
}

.top-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.top-links .social {
    width: 27px;
    height: 27px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}


/* =========================================
   BRAND HEADER
========================================= */

.brand-header {
    background: #fff;
    box-shadow: 0 3px 14px rgba(20,45,80,.07);
    position: relative;
    z-index: 5;
}

.brand-inner {
    max-width: 1450px;
    width: 92%;
    margin: auto;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dhr-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.dhr-brand img {
    width: 340px;
    max-width: 100%;
    max-height: 76px;

    object-fit: contain;
}

.brand-divider {
    width: 1px;
    height: 48px;
    background: #dbe3ed;
}

.programme-name {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.programme-name span {
    color: #52647a;
    font-size: 12px;
    font-weight: 600;
}

.programme-name strong {
    color: #064783;
    font-size: 16px;
    font-weight: 800;
}

.brand-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #edf5ff;
    color: #075ba8;
    border: 1px solid #d5e8fc;
    padding: 10px 17px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    transition: .2s ease;
    white-space: nowrap;
}

.brand-back:hover {
    color: #fff;
    background: #075ba8;
    border-color: #075ba8;
}


/* =========================================
   MAIN PAGE
========================================= */

.dhr-page {
    min-height: 100vh;
    background: #f4f7fc;
}


/* =========================================
   HERO
========================================= */

.dhr-hero {
    position: relative;
    overflow: hidden;
    padding: 5px 4%;
    min-height: 200px;
    background: linear-gradient(115deg, #06366f 0%, #0757a5 55%, #087bc8 100%);
    color: #fff;
}

.hero-pattern {
    position: absolute;
    width: 430px;
    height: 430px;
    right: 7%;
    top: -260px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
}

.hero-pattern::before,
.hero-pattern::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
}

.hero-pattern::before {
    inset: 35px;
}

.hero-pattern::after {
    inset: 75px;
}

.dhr-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    width: 92%;
    margin: auto;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #d6eaff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 13px;
}

.hero-tag i {
    font-size: 15px;
}

.dhr-hero h1 {
    color: #fff;
    font-size: clamp(30px, 4vw, 43px);
    line-height: 1.2;
    font-weight: 800;
    margin: 0 0 13px;
}

.dhr-hero p {
    max-width: 730px;
    color: #e1efff;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 23px;
    margin-top: 25px;
}

.hero-highlights span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e7f3ff;
    font-size: 11px;
    font-weight: 600;
}

.hero-highlights i {
    color: #a9dcff;
    font-size: 13px;
}


/* =========================================
   CONTENT
========================================= */

.dhr-content {
    padding: 38px 0 60px;
}

.content-container {
    width: 92%;
    max-width: 1250px;
    margin: auto;
}

.dhr-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.section-label {
    color: #0872bd;
    font-size: 10px;
    letter-spacing: 1.7px;
    font-weight: 800;
}

.dhr-heading h2 {
    color: #183c64;
    font-size: 27px;
    font-weight: 800;
    margin: 7px 0 5px;
}

.dhr-heading p {
    color: #78899e;
    font-size: 12px;
    line-height: 1.6;
    margin: 0;
}

.dhr-total {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border: 1px solid #dceafa;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(20,50,90,.04);
}

.total-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9f4ff;
    color: #0871bd;
    border-radius: 9px;
    font-size: 18px;
}

.dhr-total > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dhr-total strong {
    color: #075ba8;
    font-size: 21px;
    line-height: 1;
}

.dhr-total small {
    color: #8391a4;
    font-size: 10px;
}


/* =========================================
   SEARCH AND FILTER
========================================= */

.dhr-toolbar {
    display: flex;
    align-items: center;
    gap: 13px;
}

.dhr-search,
.dhr-filter {
    min-height: 47px;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #dce5ef;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(20,50,90,.035);
}

.dhr-search {
    flex: 1;
    padding: 0 14px;
    gap: 10px;
}

.dhr-search > i,
.dhr-filter > i {
    color: #8294a9;
    font-size: 13px;
}

.dhr-search input {
    width: 100%;
    height: 45px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #263c55;
    font-family: inherit;
    font-size: 12px;
}

.dhr-search input::placeholder {
    color: #9ba9b9;
}

.clear-search {
    border: 0;
    background: transparent;
    color: #8998aa;
    cursor: pointer;
    padding: 6px;
}

.clear-search:hover {
    color: #075ba8;
}

.dhr-filter {
    width: 175px;
    padding: 0 13px;
    gap: 9px;
}

.dhr-filter select {
    width: 100%;
    height: 45px;
    border: 0;
    outline: 0;
    color: #42566d;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.dhr-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    color: #8391a3;
    font-size: 11px;
}

.active-members {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #16834c;
    font-weight: 700;
}

.active-dot,
.status-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-radius: 50%;
    background: currentColor;
}

.active-dot {
    color: #18a45c;
    box-shadow: 0 0 0 3px rgba(24,164,92,.12);
}


/* =========================================
   PROFILE GRID
========================================= */

.dhr-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.dhr-item {
    min-width: 0;
    animation: dhrFadeIn .4s ease both;
}

.dhr-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e3eaf3;
    border-radius: 13px;
    box-shadow: 0 5px 20px rgba(20,50,90,.055);
    transition: transform .25s ease, box-shadow .25s ease;
}

.dhr-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 13px 30px rgba(20,50,90,.12);
}

.card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 17px 0;
}

.dhr-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 700;
}

.dhr-status.is-active {
    color: #16864b;
    background: #e9f8ef;
}

.dhr-status.is-inactive {
    color: #bd4141;
    background: #fff0f0;
}

.dhr-status .status-dot {
    width: 6px;
    height: 6px;
}

.card-mark {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4e91cc;
    background: #eef6ff;
    border-radius: 8px;
    font-size: 13px;
}


/* =========================================
   PROFILE PHOTO AND NAME
========================================= */

.dhr-profile {
    text-align: center;
    padding: 18px 17px 14px;
}

.dhr-photo {
    width: 112px;
    height: 112px;
    position: relative;
    margin: 0 auto 14px;
    border-radius: 50%;
    padding: 5px;
    background: #eaf4ff;
    box-shadow: 0 0 0 1px #d8eafa;
}

.dhr-photo img,
.dhr-photo .dhr-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.dhr-photo img {
    display: block;
    object-fit: cover;
    border: 2px solid #fff;
}

.dhr-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, #0755a0, #159bd1);
    color: #fff;
    font-size: 29px;
    font-weight: 800;
    letter-spacing: 1px;
}

.dhr-name h3 {
    color: #183c64;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.45;
    margin: 0 0 6px;
    overflow-wrap: anywhere;
}

.dhr-name p {
    min-height: 18px;
    color: #0873bf;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
}


/* =========================================
   PROFILE DETAILS
========================================= */

.dhr-details {
    flex: 1;
    margin: 0 17px;
    padding: 12px 0;
    border-top: 1px solid #edf1f6;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 10px 0;
    min-width: 0;
}

.detail-icon {
    flex-shrink: 0;
    width: 29px;
    height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf6ff;
    color: #0875bd;
    border-radius: 7px;
    font-size: 12px;
}

.detail-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding-top: 1px;
}

.detail-copy small {
    color: #8997a8;
    font-size: 10px;
    font-weight: 600;
}

.detail-copy strong {
    color: #40536a;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}


/* =========================================
   CARD BUTTON
========================================= */

.dhr-card-footer {
    padding: 0 17px 17px;
}

.view-profile-btn {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #d5e8fa;
    border-radius: 7px;
    background: #eff7ff;
    color: #0868b5;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

.view-profile-btn i {
    transition: transform .2s ease;
}

.view-profile-btn:hover {
    color: #fff;
    background: #075ba8;
    border-color: #075ba8;
}

.view-profile-btn:hover i {
    transform: translateX(4px);
}


/* =========================================
   EMPTY AND SEARCH STATES
========================================= */

.no-dhr-profile {
    grid-column: 1 / -1;
    text-align: center;
    padding: 55px 20px;
    background: #fff;
    border: 1px dashed #d8e4f0;
    border-radius: 12px;
}

.empty-icon {
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: #edf6ff;
    color: #79a9d5;
    font-size: 25px;
}

.no-dhr-profile h3 {
    color: #294968;
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 7px;
}

.no-dhr-profile p {
    color: #8795a6;
    font-size: 12px;
    margin: 0;
}

.no-dhr-profile button {
    margin-top: 17px;
    padding: 9px 18px;
    color: #fff;
    background: #075ba8;
    border: 0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}


/* =========================================
   PROFILE MODAL
========================================= */

.dhr-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.dhr-modal.is-open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5,24,48,.70);
    backdrop-filter: blur(4px);
}

.dhr-modal-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 70px rgba(0,0,0,.25);
    animation: modalAppear .25s ease;
}

.modal-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 20px 23px;
    color: #fff;
    background: linear-gradient(110deg, #06366f, #0876c5);
}

.modal-header-custom span {
    color: #cce6ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.modal-header-custom h2 {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    margin: 5px 0 0;
}

.modal-close {
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 50%;
    color: #fff;
    background: rgba(255,255,255,.12);
    font-size: 17px;
    cursor: pointer;
}

.modal-close:hover {
    background: rgba(255,255,255,.25);
}

.modal-profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 23px;
    border-bottom: 1px solid #edf1f6;
}

.modal-photo {
    flex-shrink: 0;
    width: 95px;
    height: 95px;
    padding: 4px;
    border-radius: 50%;
    background: #eaf4ff;
}

.modal-photo img,
.modal-photo .dhr-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.modal-photo img {
    object-fit: cover;
    border: 2px solid #fff;
}

.modal-person {
    min-width: 0;
}

.modal-person h2 {
    color: #183c64;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
    margin: 0 0 6px;
}

.modal-person p {
    color: #0873bf;
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 10px;
}

.modal-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

.modal-role.is-active {
    color: #16864b;
    background: #e9f8ef;
}

.modal-role.is-inactive {
    color: #bd4141;
    background: #fff0f0;
}

.modal-body-custom {
    padding: 22px 23px;
}

.modal-body-custom h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #244968;
    font-size: 13px;
    font-weight: 800;
    margin: 0 0 15px;
}

.modal-body-custom h3:not(:first-child) {
    margin-top: 25px;
}

.modal-body-custom h3 i {
    color: #0873bf;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.modal-info-item,
.modal-full-info {
    min-width: 0;
    padding: 13px;
    border: 1px solid #e8eef5;
    border-radius: 8px;
    background: #f9fbfe;
}

.modal-info-item small,
.modal-full-info small {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #8392a5;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-info-item small i,
.modal-full-info small i {
    color: #0873bf;
}

.modal-info-item strong,
.modal-full-info strong {
    display: block;
    color: #3c5067;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.modal-footer-custom {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
    padding: 16px 23px;
    border-top: 1px solid #edf1f6;
    background: #f8fafd;
}

.modal-action,
.modal-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 15px;
    border: 0;
    border-radius: 7px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.modal-action {
    color: #0868b5;
    background: #eaf4ff;
}

.modal-action:hover {
    color: #075ba8;
    background: #dceeff;
}

.modal-done {
    color: #fff;
    background: #075ba8;
}

.modal-done:hover {
    background: #06366f;
}


/* =========================================
   ANIMATIONS
========================================= */

@keyframes dhrFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(15px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================
   RESPONSIVE DESIGN
========================================= */

@media (max-width: 1050px) {

    .dhr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 700px) {

    .top-inner {
        padding: 9px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .top-links {
        flex-wrap: wrap;
    }

    .ministry-copy strong {
        font-size: 10px;
    }

    .brand-inner {
        min-height: 75px;
    }

    .dhr-brand img {
        width: 52px;
        height: 52px;
    }

    .programme-name span {
        font-size: 10px;
    }

    .programme-name strong {
        font-size: 12px;
    }

    .brand-back {
        padding: 9px 10px;
        font-size: 10px;
    }

    .dhr-hero {
        min-height: 250px;
        padding: 40px 0;
    }

    .dhr-hero-content {
        width: 90%;
    }

    .hero-highlights {
        gap: 12px 18px;
    }

    .dhr-content {
        padding-top: 28px;
    }

    .dhr-heading {
        align-items: flex-start;
    }

    .dhr-heading h2 {
        font-size: 23px;
    }

    .dhr-total {
        padding: 9px;
        gap: 7px;
    }

    .total-icon {
        width: 34px;
        height: 34px;
    }

    .dhr-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dhr-filter {
        width: 100%;
    }

    .dhr-grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .dhr-item {
        width: 100%;
        max-width: 460px;
        margin: auto;
    }

}

@media (max-width: 480px) {

    .top-divider,
    .ministry-copy {
        display: none;
    }

    .brand-inner {
        width: 94%;
        gap: 8px;
    }

    .brand-divider {
        height: 38px;
    }

    .programme-name strong {
        font-size: 10px;
    }

    .brand-back span {
        display: none;
    }

    .brand-back {
        width: 35px;
        height: 35px;
        justify-content: center;
        padding: 0;
    }

    .dhr-heading {
        flex-direction: column;
    }

    .dhr-total {
        align-self: flex-start;
    }

    .dhr-result-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .modal-profile-header {
        align-items: flex-start;
        padding: 18px;
        gap: 13px;
    }

    .modal-photo {
        width: 75px;
        height: 75px;
    }

    .modal-person h2 {
        font-size: 15px;
    }

    .modal-info-grid {
        grid-template-columns: 1fr;
    }

    .modal-body-custom {
        padding: 18px;
    }

    .modal-footer-custom {
        padding: 14px 18px;
    }

}
